home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Utilities / Remotes / Source / Info.m < prev    next >
Encoding:
Text File  |  1992-09-23  |  2.0 KB  |  74 lines

  1. /*---------------------------------------------------------------------------
  2. Info.m -- Display the info panel.
  3.  
  4. Copyright (c) 1992 The University of Iowa
  5.  
  6. This code manages the info panel.  Upon initialization, the Info.nib file is
  7. loaded.
  8.  
  9. Rex Pruess <Rex-Pruess@uiowa.edu>
  10.  
  11. $Header: /rpruess/apps/Remotes3.0/RCS/Info.m,v 3.0 92/09/23 21:45:07 rpruess Exp $
  12. -----------------------------------------------------------------------------
  13. $Log:    Info.m,v $
  14. Revision 3.0  92/09/23  21:45:07  rpruess
  15. At NeXT System Release 3.0, I separated the info.nib panel from the main
  16. nib file.
  17.  
  18. ---------------------------------------------------------------------------*/
  19.  
  20. /* Appkit header files */
  21. #import <appkit/Application.h>
  22. #import <appkit/Control.h>
  23. #import <appkit/Panel.h>
  24.  
  25. /* Application class header files */
  26. #import "Info.h"
  27. #import "GNULicense.h"
  28.  
  29. @implementation Info
  30.  
  31. /*---------------------------------------------------------------------------
  32. When the info panel is requested the first time, we must do some work.
  33. -----------------------------------------------------------------------------*/
  34. - init
  35. {
  36.    self = [super init];
  37.  
  38.    [NXApp loadNibSection:"Info.nib" owner:self withNames:NO];
  39.    [infoPanel setMiniwindowIcon:"app"];
  40.  
  41.    myGNULicense = nil;
  42.  
  43.    return self;
  44. }
  45.  
  46. /*---------------------------------------------------------------------------
  47. Show 'em the info panel.
  48. -----------------------------------------------------------------------------*/
  49. - showInfoPanel:sender
  50. {
  51.    [infoPanel makeKeyAndOrderFront:self];
  52.    return self;
  53. }
  54.  
  55. /*---------------------------------------------------------------------------
  56. Display the GNU license.
  57. -----------------------------------------------------------------------------*/
  58. - showGNULicense:sender
  59. {
  60.    if (myGNULicense == nil)
  61.       myGNULicense = [[GNULicense alloc] init];
  62.  
  63.    /*** Not really necessary, but kinda cutesy. */
  64.    if ([sender isKindOf:[Control class]] == YES) {
  65.       [sender setTarget:myGNULicense];
  66.       [sender setAction:@selector (showLicense:)];
  67.    }
  68.  
  69.    [myGNULicense showLicense:self];
  70.    return self;
  71. }
  72.  
  73. @end
  74.